<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
</head>

<body>
	<div id="header-wrap" data-mn="0">
		<a href="###" data-link="safe" data-type="ico" class="left ico-m ico-left"></a>
		<h2>修改手机号</h2>
	</div>
		<div class="tips">
			<div class="t-info">请设置新密码</div>
			<div class="t-error"></div>
		</div>
		<form>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-lock" data-type="ico">
				<div class="fl-cont form-input f-right-ico">
					<input type="password" id="nwp" placeholder="请设置密码" />
					<a href="###" data-type="ico" class="check-pw ico-m ico-eye"></a>
				</div>
			</li>
		</ul>
		<div class="">
			<a href="###" data-link="edit-pw-3" class="btn b-red"><span id="check">确认</span></a>
		</div>
		</form>
	<div class="feed-info">
	如有疑问<br />
	客服电话：400-105-8851<br />
	微信客服：wuyifugui(公众号)
	</div>
	<script>
	$(function(){
		$(".check-pw").hover(
			function(){$(this).siblings("input").attr("type","text")},
			function(){$(this).siblings("input").attr("type","password")}
		)
		$("#check").on("click",function(){
			var old_pw = $.cookie("user_pw");
			var pw = $("#nwp").val();
			var check_return = $("#nwp").check({type:5})
			if(check_return == 0){
				$(".t-error").text("密码需要以字母开头，在6-18字符之间，只能包含字母、数字和下划线").fadeIn();
				$(".t-info").hide();
				reset_tip()
				return false
			}else if(pw == old_pw){
				$(".t-error").text("新密码不能与原始密码一样").fadeIn(100);
				$(".t-info").hide();
				reset_tip()
				return false
			}else{
				$.cookie("user_pw",pw)
			}
		
		})
	})
	</script>	
</body>

</html>
